		<fieldset>
		<legend>Categorie</legend>
	<?php
    /*ELENCO SCONTRINI*/
    echo "\t".'<div class="box" id="cat-scontrini">Elenco Scontrini</div>'."\n";//$('#prodotti').load("ajax.php?case=cat-1");
    echo "\t\t".'<script type="text/javascript">
					$(\'#cat-scontrini\')
						.click(function(){
							$(\'#prodotti\')
								.html(\'<img class="loading" src="images/ajax-loader.gif" alt="loading..." /></div>\')
								.load(\'ajax.php?case=cartrighelist\')
								})
				</script>'."\n";


	$query = "SELECT * FROM categorie WHERE IDruolo > 0";
	if ($result = $mysqli->query($query)) {

		/* fetch associative array */
		while ($row = $result->fetch_assoc()) {
			echo "\t".'<div class="box" id="cat-'.$row["IDcategoria"].'">'.$row["Categoria"].'</div>'."\n";//$('#prodotti').load("ajax.php?case=cat-1", hideLoading);
			echo "\t\t".'<script type="text/javascript">
				$("#cat-'.$row["IDcategoria"].'").click(function(){
					$("#prodotti").html(\'<img class="loading" src="images/ajax-loader.gif" alt="loading..." />\');
					$("#prodotti").load(\'ajax.php?case=cat&id='.$row["IDcategoria"].'\'); 	
				});
				</script>'."\n";
		}

		/* free result set */
		$result->free();
	}
	?>
		</fieldset>